﻿using System;

namespace Scriptables.Items {
  [Serializable]
  public class Item {
    public string Name;
    public int Id = -1;
    public ItemBuff[] buffs;
    public Item() {
      Name = "";
      Id = -1;
    }
    public Item(ItemObject item) {
      Name = item.name;
      Id = item.data.Id;
      buffs = new ItemBuff[item.data.buffs.Length];
      for (int i = 0; i < buffs.Length; i++) {
        buffs[i] = new ItemBuff(item.data.buffs[i].Min, item.data.buffs[i].Max) {
          stat = item.data.buffs[i].stat
        };
      }
    }
  }
}

